Game Variables


"Game Variables", also referred to as "Registers", store both important game information and user-managed information that should be available to scripts. There are two different types:
Game Registers - Registers built-in to the program, listed in this documentation
User Registers - Registers defined by the user by creating extra Register space
                 with the appropriate option in the Game Def file
There are two different ways in which these Registers are referenced by script:
Index:

   0 - _Screen_Mode
   1 - _Curr_Screen

   2 - _FreezeObjects

   3 - _act
   4 - _zone
   5 - _lastact
   6 - _lastzone
   7 - _InLevel
   8 - _Host_Platform

   9 - _Curr_Player

  10 - _XMEffectParam

  11 - _Tiles_Length_X
  12 - _Tiles_Length_Y
  13 - _Screen_Active_Width
  14 - _Screen_Active_Height
  15 - _Screen_Actual_Width
  16 - _Screen_Actual_Height

  17 - _mainvpx
  18 - _mainvpy

  19 - _vpxr[0]
  20 - _vpxr[1]
  21 - _vpyr[0]
  22 - _vpyr[1]

  23 - _LevelBound_X1[0]
  24 - _LevelBound_X1[1]
  25 - _LevelBound_Y1[0]
  26 - _LevelBound_Y1[1]
  27 - _LevelBound_X2[0]
  28 - _LevelBound_X2[1]
  29 - _LevelBound_Y2[0]
  30 - _LevelBound_Y2[1]

  31 - _Target_LevelBound_X1[0]
  32 - _Target_LevelBound_X1[1]
  33 - _Target_LevelBound_Y1[0]
  34 - _Target_LevelBound_Y1[1]
  35 - _Target_LevelBound_X2[0]
  36 - _Target_LevelBound_X2[1]
  37 - _Target_LevelBound_Y2[0]
  38 - _Target_LevelBound_Y2[1]

  39 - _XLoop_Active[0]
  40 - _XLoop_Active[1]
  41 - _YLoop_Active[0]
  42 - _YLoop_Active[1]

  43 - _BGOffsetX[0]
  44 - _BGOffsetX[1]
  45 - _BGOffsetY[0]
  46 - _BGOffsetY[1]

  47 - _XLoop_Size[0]
  48 - _XLoop_Size[1]
  49 - _YLoop_Size[0]
  50 - _YLoop_Size[1]

  51 - _Curr_Palette

.... - (Unused)

  54 - _Water_Level

  55 - _FrameCounter

  56 - _VPX_Bounce[0]
  57 - _VPX_Bounce[1]
  58 - _VPY_Bounce[0]
  59 - _VPY_Bounce[1]

.... - (Unused)

.... - (Reserved, 200-231)

.... - (Unused)

 241 - _OE_Property[0]
 242 - _OE_Property[1]
 243 - _OE_Property[2]
 244 - _OE_Property[3]

 245 - _Key_InitialDelay
 246 - _Key_RepeatDelay

 247 - _VSync

 248 - _GameFlags

 249 - _FrameSkipCount
 250 - _FrameSkip
 251 - _FrameLock

 252 - _piccount
 253 - _GamePaused
 254 - _Max_Objects_Used
 255 - (Reserved)

Descriptions:
   0 - _Screen_Mode

   1 - _Curr_Screen

   2 - _FreezeObjects

   3 - _act
   4 - _zone

   5 - _lastact
   6 - _lastzone

   7 - _InLevel

   8 - _Host_Platform

   9 - _Curr_Player

  10 - _XMEffectParam

  11 - _Tiles_Length_X
  12 - _Tiles_Length_Y

  13 - _Screen_Active_Width
  14 - _Screen_Active_Height

  15 - _Screen_Actual_Width
  16 - _Screen_Actual_Height

  17 - _mainvpx
  18 - _mainvpy

  19 - _vpxr[0]
  20 - _vpxr[1]
  21 - _vpyr[0]
  22 - _vpyr[1]

  23 - _LevelBound_X1[0]
  24 - _LevelBound_X1[1]
  25 - _LevelBound_Y1[0]
  26 - _LevelBound_Y1[1]
  27 - _LevelBound_X2[0]
  28 - _LevelBound_X2[1]
  29 - _LevelBound_Y2[0]
  30 - _LevelBound_Y2[1]

  31 - _Target_LevelBound_X1[0]
  32 - _Target_LevelBound_X1[1]
  33 - _Target_LevelBound_Y1[0]
  34 - _Target_LevelBound_Y1[1]
  35 - _Target_LevelBound_X2[0]
  36 - _Target_LevelBound_X2[1]
  37 - _Target_LevelBound_Y2[0]
  38 - _Target_LevelBound_Y2[1]

  39 - _XLoop_Active[0]
  40 - _XLoop_Active[1]
  41 - _YLoop_Active[0]
  42 - _YLoop_Active[1]

  43 - _BGOffsetX[0]
  44 - _BGOffsetX[1]
  45 - _BGOffsetY[0]
  46 - _BGOffsetY[1]

  47 - _XLoop_Size[0]
  48 - _XLoop_Size[1]
  49 - _YLoop_Size[0]
  50 - _YLoop_Size[1]

  51 - _Curr_Palette

.... - (Unused)

  54 - _Water_Level

  55 - _FrameCounter

  56 - _VPX_Bounce[0]
  57 - _VPX_Bounce[1]
  58 - _VPY_Bounce[0]
  59 - _VPY_Bounce[1]

.... - (Unused)

.... - (Reserved)

.... - (Unused)

 241 - _OE_Property[0]
 242 - _OE_Property[1]
 243 - _OE_Property[2]
 244 - _OE_Property[3]

 245 - _Key_InitialDelay

 246 - _Key_RepeatDelay

 247 - _VSync

 248 - _GameFlags

 249 - _FrameSkipCount

 250 - _FrameSkip

 251 - _FrameLock

 252 - _piccount

 253 - _GamePaused

 254 - _Max_Objects_Used

 255 - (Reserved)